package DAO;

import java.sql.Connection;
import java.sql.DriverManager;
/**
 *
 * @author Storm^^Rain
 */
public class ConnectionDB {
    
    private static Connection conn;
    private static String strConnect;

    public static Connection getConnection() {     
        return conn;
    }
    
    public static boolean connect(String ConnectString) {
        
        strConnect = ConnectString;
        try {
            Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
            conn = DriverManager.getConnection(strConnect);
        } catch (Exception ex) {
            return false;
        }
        
        return true;
    }    
    
}
